<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">


<!-- Mirrored from www.zi-han.net/theme/hplus/form_builder.html by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 20 Jan 2016 14:20:19 GMT -->
<head>

<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />


<title>厚合尚品商城管理后台</title>

<link rel="shortcut icon" href="favicon.ico" />
<link rel="stylesheet" href="mng/css/bootstrap.min.css"
	th:href="@{/mng/css/bootstrap.min.css}" />
<link rel="stylesheet"
	href="mng/css/plugins/bootstrap-fileinput/fileinput.css"
	th:href="@{/mng/css/plugins/bootstrap-fileinput/fileinput.css}" />
<link rel="stylesheet" href="mng/css/font-awesome.min93e3.css?v=4.4.0"
	th:href="@{/mng/css/font-awesome.min93e3.css?v=4.4.0}" />
<link rel="stylesheet" href="mng/css/animate.min.css"
	th:href="@{/mng/css/animate.min.css}" />

<link rel="stylesheet" href="mng/css/plugins/simditor/simditor.css"
	th:href="@{/mng/css/plugins/simditor/simditor.css}" />
<link rel="stylesheet" href="mng/css/style.min862f.css?v=4.1.0"
	th:href="@{/mng/css/style.min862f.css?v=4.1.0}" />


<style>
.droppable-active {
	background-color: #ffe !important
}

.tools a {
	cursor: pointer;
	font-size: 80%
}

.form-body .col-md-6, .form-body .col-md-12 {
	min-height: 400px
}

.draggable {
	cursor: move
}
</style>

</head>

<body class="gray-bg">
	<div class="wrapper wrapper-content">

		<div class="row">
			<div class="col-sm-12">
				<div class="ibox float-e-margins">
					<div class="ibox-title">
						<h5>新增商品</h5>

					</div>
					<div class="ibox-content">

						<form role="form" class="form-horizontal m-t" id="form1"
							th:action="@{/product/savepro}" method="post"
							enctype="multipart/form-data">
							<div class="form-group draggable">
								<label class="col-sm-3 control-label">商品名称：</label>
								<div class="col-sm-9">
									<input type="text" name="productName" class="form-control"
										placeholder="请输入商品名称" required="required" />
								</div>
							</div>
							<div class="form-group draggable">
								<label class="col-sm-3 control-label">商品类别：</label>
								<div class="col-sm-9">
									<select class="form-control" name="typeId">
										<option th:each="typeInfo: ${typeList}"
											th:value="${typeInfo.typeId}" th:text="${typeInfo.typeName}"></option>
									</select>
								</div>
							</div>
							<div class="form-group draggable">
								<label class="col-sm-3 control-label">计量单位：</label>
								<div class="col-sm-9">
									<input type="text" name="countUnit" class="form-control"
										placeholder="如个、件、箱" />
								</div>
							</div>
							<div class="form-group draggable">
								<label class="col-sm-3 control-label">市场价：</label>
								<div class="col-sm-9">
									<input type="text" name="marketPrice" class="form-control"
										placeholder="0.00" required="required"  />
								</div>
							</div>
							<div class="form-group draggable">
								<label class="col-sm-3 control-label">商城价：</label>
								<div class="col-sm-9">
									<input type="text" name="price" class="form-control"
										placeholder="0.00" required="required"  />
								</div>
							</div>
							<div class="form-group draggable">
								<label class="col-sm-3 control-label">抵扣积分：</label>
								<div class="col-sm-9">
									<input type="text" name="bonus" class="form-control"
										placeholder="0"  required="required" />
								</div>
							</div>
							<div class="form-group draggable">
								<label class="col-sm-3 control-label">入库数量：</label>
								<div class="col-sm-9">
									<input type="text" name="stockCount" class="form-control"
										placeholder="0" required="required"  />
								</div>
							</div>
							<div class="form-group draggable">
								<label class="col-sm-3 control-label">销售状态：</label>
								<div class="col-sm-9">
									<label class="checkbox-inline"><input type="radio" name="sellStatus" checked="checked" value="0" id="st1" class="radio"/>普通</label>
									<label class="checkbox-inline"><input type="radio" name="sellStatus"  value="1" id="st1" class="radio"/>热销</label>
									<label class="checkbox-inline"><input type="radio" name="sellStatus" value="2" id="st1" class="radio"/>推荐</label>
								</div>
							</div>
							<div class="form-group draggable">
								<label class="col-sm-3 control-label">缩略图片：</label>
								<div class="col-sm-9">
									<input id="file-0" name="smallfile" type="file" class="file" />
									<p class="help-block">尺寸为 230 *
										230px，支持jpg、jpeg、png格式，大小不超过2.0M</p>
								</div>
							</div>
							<div class="form-group draggable">
								<label class="col-sm-3 control-label">轮播图片：</label>
								<div class="col-sm-9">
									<input id="file-1" name="myfiles" type="file"
										multiple="multiple" class="file"
										data-overwrite-initial="false" data-min-file-count="1" />
									<p class="help-block">注意先点击上传图片，支持jpg、jpeg、png格式，大小不超过2.0M</p>
								</div>
							</div>
							
							<div class="form-group draggable">
								<label class="col-sm-3 control-label">供应商：</label>
								<div class="col-sm-9">
									<select class="form-control" name="supplierId">
										<option th:each="supplierInfo: ${supplierInfos}"
											th:value="${supplierInfo.supplierId}" th:text="${supplierInfo.supplierName}"></option>
									</select>
								</div>
							</div>
							
							<div class="form-group draggable">
								<label class="col-sm-3 control-label">商品详情：</label>
								<div class="col-sm-9">
									<div class="ibox-content">
										<textarea id="editor" name="detail" placeholder="这里输入内容"
											autofocus="autofocus">
		                            
		                        </textarea>
									</div>
								</div>
							</div>

							<div class="hr-line-dashed"></div>
							<div class="form-group draggable">
								<div class="col-sm-12 col-sm-offset-3">
									<button class="btn btn-primary" type="submit" id="savepro">保存</button>
									<button class="btn btn-white" type="reset">重置</button>
								</div>
							</div>
						</form>
						<div class="clearfix"></div>
					</div>

				</div>
			</div>

		</div>
	</div>

	<script src="mng/js/jquery.min.js" th:src="@{/mng/js/jquery.min.js}"></script>
	<script src="mng/js/bootstrap.min.js"
		th:src="@{/mng/js/bootstrap.min.js}"></script>
	<script src="mng/js/plugins/bootstrap-fileinput/fileinput.js"
		th:src="@{/mng/js/plugins/bootstrap-fileinput/fileinput.js}"></script>
	<script src="mng/js/plugins/metisMenu/jquery.metisMenu.js"
		th:src="@{/mng/js/plugins/metisMenu/jquery.metisMenu.js}"></script>
	<script src="mng/js/plugins/slimscroll/jquery.slimscroll.min.js"
		th:src="@{/mng/js/plugins/slimscroll/jquery.slimscroll.min.js}"></script>
	<script src="mng/js/plugins/layer/layer.min.js"
		th:src="@{/mng/js/plugins/layer/layer.min.js}"></script>
	<script src="mng/js/hplus.min.js?v=4.1.0"
		th:src="@{/mng/js/hplus.min.js?v=4.1.0}"></script>
	<script src="mng/js/plugins/simditor/module.js"
		th:src="@{/mng/js/plugins/simditor/module.js}"></script>
	<script src="mng/js/plugins/simditor/uploader.js"
		th:src="@{/mng/js/plugins/simditor/uploader.js}"></script>
	<script src="mng/js/plugins/simditor/hotkeys.js"
		th:src="@{/mng/js/plugins/simditor/hotkeys.js}"></script>
	<script src="mng/js/plugins/simditor/simditor.js"
		th:src="@{/mng/js/plugins/simditor/simditor.js}"></script>

	<script src="mng/js/plugins/bootstrap-fileinput/zh.js"
		th:src="@{/mng/js/plugins/bootstrap-fileinput/zh.js}"></script>


	<script>
		$("#file-0").fileinput({
			language : 'zh',
			allowedFileExtensions : [ 'jpg', 'png', 'bmp', 'jpeg' ],
			overwriteInitial : false,
			showUpload : false,
			dropZoneEnabled : false,
			uploadAsync : false

		});
		
		$("#file-1").fileinput({
			language : 'zh',
			uploadUrl : '/product/saveproimg',
			allowedFileExtensions : [ 'jpg', 'png', 'bmp', 'jpeg' ],
			overwriteInitial : false,
			showUpload : true,
			dropZoneEnabled : false,
			maxFileSize : 1000,
			maxFilesNum : 3

		});
		
	    $(function () {
	        //可以参考 http://www.jcodecraeer.com/a/javascript/2015/0201/2393.html
	        editor = new Simditor({
	            textarea: $('#editor'),
	            placeholder: '这里输入商品详情...',
	            toolbar: ['title', 'bold', 'italic', 'underline', 'strikethrough', 'color', '|', 'ol', 'ul', 'blockquote', 'code', 'table', '|', 'link', 'hr', '|', 'indent', 'outdent'],
	            
	        });
	    })
		/* $("#file-1").on("fileuploaded",function(data){
			$.ajax({
				url:'/product/savepro',
				type:'post',
				dataType:'json',
				data:$('#form1').serialize(),
				success:function(data,status){
					
				},
				cache:false,
			});
		});
		
		$("#savepro").on("click",function(){
			$("#file-1").fileinput('upload');
		}); */
	</script>
</body>


<!-- Mirrored from www.zi-han.net/theme/hplus/form_builder.html by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 20 Jan 2016 14:20:20 GMT -->
</html>
